#include <iostream>
#include <stdio.h>
#include <fstream>
#include <string>
#include <vector>

int main(int argc, char** argv) {
	std::ifstream file;
	std::string line;
	std::string::iterator it;
	file.open(argv[1]);

	while (std::getline(file, line)) {
		std::vector<int> listA;
		std::vector<int> listB;
		std::string temp;
		bool A = true;

		// create number lists
		for (it = line.begin(); it != line.end(); ++it) {
			if (*it != ' ' && *it != '|') {
				char* c = &*it;
				temp.append(c);
			} 
			else {
				if (*it == '|') {
					A = false;
					++it;
				}
				else {
					if (A) {
						listA.push_back(atoi(temp.c_str()));
						temp.clear();
					}
					else {
						listB.push_back(atoi(temp.c_str()));
						temp.clear();
					}
				}
			}
		}
		listB.push_back(atoi(temp.c_str()));
		temp.clear();

		// multiply
		if (listA.size() == listB.size()) {
			for (int i = 0; i < listA.size(); ++i) {
				std::cout << listA.at(i) * listB.at(i) << " ";
			}
		}
		else {
			std::cout << "list sizes don't match";
		}

		putchar('\n');
	}

	file.close();
	return 0;
}